import 'package:flutter/material.dart';

class Colours {
  static const Color app_main = Color(0xffffffff);

  static const Color transparent_80 = Color(0x80000000); //<!--204-->

  static const Color text_dark = Color(0xFF333333);
  static const Color text_content2 = Color(0xFF565C66);
  static const Color text_normal = Color(0xFF666666);
  static const Color text_gray = Color(0xFF999999);

  static const Color divider = Color(0xffe5e5e5);

  static const Color gray_33 = Color(0xFF333333); //51
  static const Color gray_66 = Color(0xFF666666); //102
  static const Color gray_99 = Color(0xFF999999); //153
  static const Color common_orange = Color(0XFFFC9153); //252 145 83
  static const Color gray_ef = Color(0XFFEFEFEF); //153

  static const Color gray_f0 = Color(0xfff0f0f0);
  static const Color gray_f7 = Color(0xffe9f2f7);
  static const Color gray_f5 = Color(0xfff5f5f5);
  static const Color gray_cc = Color(0xffcccccc);
  static const Color gray_ce = Color(0xffcecece);
  static const Color green_1 = Color(0xff009688);
  static const Color green_62 = Color(0xff626262);
  static const Color green_e5 = Color(0xffe5e5e5);
  static const Color blue_fe = Color(0xffE9F1F7);
  static const Color blue_f2 = Color(0xff2da4f4);
  static const Color blue_f4 = Color(0xfff45c2d);
  //我的页面背景色
  static const Color gray_f6 = Color(0xfff6f6f6);
  static const Color gray_a2 = Color(0xffA2A5AD);
  // ignore: non_constant_identifier_names
//  static const Color gray_f3 = hexToColor("#A2A5AD");


  static Color hexToColor(String s) {
// 如果传入的十六进制颜色值不符合要求，返回默认值
    if (s == null ||
        s.length != 7 ||
        int.tryParse(s.substring(1, 7), radix: 16) == null) {
      s = '#999999';
    }
    return new Color(int.parse(s.substring(1, 7), radix: 16) + 0xFF000000);
  }

}

Map<String, Color> circleAvatarMap = {
  'A': Colors.blueAccent,
  'B': Colors.blue,
  'C': Colors.cyan,
  'D': Colors.deepPurple,
  'E': Colors.deepPurpleAccent,
  'F': Colors.blue,
  'G': Colors.green,
  'H': Colors.lightBlue,
  'I': Colors.indigo,
  'J': Colors.blue,
  'K': Colors.blue,
  'L': Colors.lightGreen,
  'M': Colors.blue,
  'N': Colors.brown,
  'O': Colors.orange,
  'P': Colors.purple,
  'Q': Colors.black,
  'R': Colors.red,
  'S': Colors.blue,
  'T': Colors.teal,
  'U': Colors.purpleAccent,
  'V': Colors.black,
  'W': Colors.brown,
  'X': Colors.blue,
  'Y': Colors.yellow,
  'Z': Colors.grey,
  '#': Colors.blue,
};

Map<String, Color> themeColorMap = {
  'gray': Colours.gray_33,
  'blue': Colors.blue,
  'blueAccent': Colors.blueAccent,
  'cyan': Colors.cyan,
  'deepPurple': Colors.deepPurple,
  'deepPurpleAccent': Colors.deepPurpleAccent,
  'deepOrange': Colors.deepOrange,
  'green': Colors.green,
  'indigo': Colors.indigo,
  'indigoAccent': Colors.indigoAccent,
  'orange': Colors.orange,
  'purple': Colors.purple,
  'pink': Colors.pink,
  'red': Colors.red,
  'teal': Colors.teal,
  'black': Colors.black,
};
